<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>待接收</title>
    <link rel="stylesheet" href="https://tstatic.dgg.net/static/plugs/DataTables/css/jquery.dataTables.css">
    <link rel="stylesheet" href="https://tstatic.dgg.net/static/plugs/layui/css/layui.min.css">
    <link rel="stylesheet" href="https://tstatic.dgg.net/static/css/dgg-iboss.min.css">
    <link rel="stylesheet" href="https://tstatic.dgg.net/static/css/dgg-plugs.min.css">
    <link rel="stylesheet" href="../../css/aptitudes.min.css">
</head>
<body>
此处只有弹窗，列表参照html/demo/list.html
<div class="table-conter">
    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="receive()">接收</a>
    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="sendBack()">退回</a>
    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="chargeBack()">退单</a>
    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="transferOrder()">转单</a>
    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="fileBinding()">档案绑定</a>
    <a href="javascript:void(0)" class="layui-btn layui-btn-mini" onclick="turnOver()">移交</a>
</div>
<!--退回 弹窗 start-->
<div class="content-layer layui-layer-wrap" id="sendBack">
    <div class="remark-input-box">
        <p class="mb8"><span class="required">备注：</span></p>
        <textarea class="textarea-style" rows="3" placeholder="500字以内"></textarea>
    </div>
</div>
<!--退回 弹窗 end-->
<!--退单 弹窗 start-->
<div class="content-layer layui-layer-wrap" id="chargeBack">
    <table  class="add-table form-table">
        <tbody>
        <tr>
            <th><span class="required">申请理由：</span></th>
            <td>
                <select class="select-style" name="businessOrganizationId">
                    <option value="1">请选择</option>
                    <option value="2">张三</option>
                    <option value="2">李四</option>
                </select>
            </td>
        </tr>
        <tr>
            <th><span class="required">审核人：</span></th>
            <td>
                <select name="" class="chooseUser">
                    <option value=""></option>
                </select>
            </td>
        </tr>
        <tr>
            <th>备注：</th>
            <td>
                <textarea class="textarea-style" rows="4" placeholder="500字节以内"></textarea>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<!--退单 弹窗 end-->
<!--转单 弹窗 start-->
<div class="content-layer layui-layer-wrap" id="transferOrder">
    <table class="add-table form-table">
        <tbody>
        <tr>
            <th>流程人员：</th>
            <td>王小毛（综合事业部 商务一中心 商务一部）</td>
        </tr>
        <tr>
            <th><span class="required">客户名称：</span></th>
            <td>
                <select class="select-style" name="businessOrganizationId">
                    <option value="1">请选择</option>
                    <option value="2">张三</option>
                    <option value="2">李四</option>
                </select>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="popups-info">
        <table  class="add-table form-table">
            <tbody>
            <tr>
                <th>备注</th>
                <td>
                    <textarea class="textarea-style" rows="4" cols="40" placeholder="500字节以内"></textarea>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<!--档案绑定 弹窗 end-->
<div class="content-layer layui-layer-wrap" id="fileBinding">
    <input type="hidden" class="layerIndex" />
    <table  class="add-table form-table">
        <tbody>
        <tr>
            <th>当前绑定档案编号：</th>
            <td>XXXXX452</td>
        </tr>
        <tr>
            <th>绑定档案：</th>
            <td>
                <input type="text" class="input-style" placeholder="请输入客户名 / 档案编号">
                <button type="button" class="layui-btn layui-btn-mini" onclick="searchFile()">搜索</button>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="popups-info">
        <table id="myTable" class="cell-border crm-table">
        </table>
    </div>
</div>
<!--档案绑定 弹窗 end-->
<!--移交 弹窗 start-->
<div class="content-layer layui-layer-wrap" id="turnOver">
    <table  class="add-table form-table">
        <tbody>
        <tr>
            <th>部门选择：</th>
            <td>
                <select class="select-style" name="businessOrganizationId">
                    <option value="1">请选择</option>
                    <option value="2">张三</option>
                    <option value="2">李四</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>负责人：</th>
            <td>
                <select class="select-style" name="businessOrganizationId">
                    <option value="1">请选择</option>
                    <option value="2">张三</option>
                    <option value="2">李四</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>备注：</th>
            <td>
                <textarea class="textarea-style" rows="4" cols="40" placeholder="500字节以内"></textarea>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<!--移交 弹窗 end-->
<script src="https://tstatic.dgg.net/static/plugs/jquery/jquery-1.9.1.min.js"></script>
<script src="https://tstatic.dgg.net/static/plugs/layui/layui.all.js"></script>
<script src="https://tstatic.dgg.net/static/plugs/DataTables/js/jquery.dataTables.js"></script>
<script src="https://tstatic.dgg.net/static/plugs/DataTables/js/dataTables.fixedColumns.min.js"></script>
<script src="https://tstatic.dgg.net/static/plugs/DataTables/js/dataTable.extend.js"></script>
<script src="https://tstatic.dgg.net/static/js/dgg-foot-base.js"></script>
<script src="https://tstatic.dgg.net/static/plugs/select2/js/select2.min.js"></script>
<script src="../../js/zzsc/common/sc_chooseUser.js"></script>
<script>
    function receive() {
        DGG.Confire('<span class="red">注：确认接收后，对应生产订单将进入生产办理环节</span>','是否确认接收？',function() { alert('确认') })
    }
    function sendBack() {
        dgg.Open({
            title: '是否确认退回？',
            content: $('#sendBack'),
            area: '500px'
        })
    }

    function chargeBack() {
        dgg.Open({
            title: '申请退单',
            content: $('#chargeBack'),
            area: '500px',
            success:function () {
                chooseUserPlug.init($('.chooseUser'),{
                    width:'240px',
                    url:'https://www.easy-mock.com/mock/5b601a98e5570610098cc81f/interface/chooseUser.do',
                    requestUrl:'../demo/chooseUserAjax.html'
                })
            }
        })
    }
    function transferOrder() {
        dgg.Open({
            title: '转单',
            content: $('#transferOrder'),
            area: '500px',
            success:function () {
                chooseUserPlug.init($('.chooseUser'),{
                    width:'240px',
                    url:'https://www.easy-mock.com/mock/5b601a98e5570610098cc81f/interface/chooseUser.do',
                    requestUrl:'../demo/chooseUserAjax.html'
                })
            }
        })
    }
    function fileBinding() {
        dgg.Open({
            title: '档案绑定',
            content: $('#fileBinding'),
            area: '700px',
            success:function(layero, index){
                $('.layerIndex').val(index)
            }
        })
    }

    var fileTableObj;
    function searchFile() {
        console.log(fileTableObj)
        if(fileTableObj!=undefined) {
            fileTableObj.ajax.reload();
        }else {
            fileTableObj=$('#myTable').dataTableExtend({
                "ajax": "https://www.easy-mock.com/mock/5b601a98e5570610098cc81f/interface/table.co",
                "oneSelectCheck":true,
                "fnInitComplete": function(settings, json) {
                    //datatable加载完后重定位弹窗
                    dgg.relocation($('.layerIndex').val())
                },
                "aoColumns": [
                    {
                        "title":"选择",
                        "sClass": "check-th",
                        "orderable": false,
                        "data": "ID",
                        "render": function (data, type, full, meta) {
                            return '<input type="checkbox"  class="checkchild"  value="' + data + '" />';
                        }
                    },
                    {
                        "title":"客户名",
                        "orderable": false,
                        "data": "createrName"
                    },
                    {
                        "title":"档案编号",
                        "orderable": false,
                        "data": "no"
                    },
                    {
                        "title":"档案状态",
                        "orderable": false,
                        "data": "originType"
                    },
                    {
                        "title":"操作",
                        "orderable": false,
                        "render": function (data, type, full, meta) {
                            return '<a href="javascript:void(0)" class="iboss-link">绑定</a>';
                        }
                    },
                ]
            })
        }
    }

    function turnOver() {
        dgg.Open({
            title: '移交',
            content: $('#turnOver'),
            area: '500px'
        })
    }
</script>
</body>
</html>